home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 98 / Skunkware 98.iso / src / mail / pine3.96.tar.gz / pine3.96.tar / pine3.96 / pico / cc5.sol < prev    next >
Text File  |  1993-07-30  |  2KB  |  70 lines

  1. #!/sbin/sh
  2. #    Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  3. #      All Rights Reserved
  4.  
  5. #    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T
  6. #    The copyright notice above does not evidence any
  7. #    actual or intended publication of such source code.
  8.  
  9. #ident    "@(#)cc.sh    1.8    92/05/26 SMI"    /* SVr4.0 1.4    */
  10.  
  11. #        PROPRIETARY NOTICE (Combined)
  12. #
  13. #This source code is unpublished proprietary information
  14. #constituting, or derived under license from AT&T's UNIX(r) System V.
  15. #In addition, portions of such source code were derived from Berkeley
  16. #4.3 BSD under license from the Regents of the University of
  17. #California.
  18. #
  19. #
  20. #
  21. #        Copyright Notice 
  22. #
  23. #Notice of copyright on this source code product does not indicate 
  24. #publication.
  25. #
  26. #    (c) 1986,1987,1988,1989  Sun Microsystems, Inc
  27. #    (c) 1983,1984,1985,1986,1987,1988,1989  AT&T.
  28. #              All rights reserved.
  29.  
  30. # cc command for BSD compatibility package:
  31. #
  32. #    BSD compatibility package header files (/usr/ucbinclude)
  33. #    are included before SVr4 default (/usr/include) files but 
  34. #       after any directories specified on the command line via 
  35. #    the -I option.  Thus, the BSD header files are included
  36. #    next to last, and SVr4 header files are searched last.
  37. #    
  38. #    BSD compatibility package libraries (/usr/ucblib) are
  39. #    searched next to third to last.  SVr4 default libraries 
  40. #    (/usr/ccs/lib and /usr/lib) are searched next to last
  41. #
  42. #    Because the BSD compatibility package C library does not 
  43. #    contain all the C library routines of /usr/ccs/lib/libc.a, 
  44. #    the BSD package C library is named /usr/ucblib/libucb.a
  45. #    and is passed explicitly to cc.  This ensures that libucb.a 
  46. #    will be searched first for routines and that 
  47. #    /usr/ccs/lib/libc.a will be searched afterwards for routines 
  48. #    not found in /usr/ucblib/libucb.a.  Also because sockets is    
  49. #       provided in libc under BSD, /usr/lib/libsocket and /usr/lib/nsl
  50. #       are also included as default libraries.
  51. #
  52. #    NOTE: the -Y L, and -Y U, options of cc are not valid 
  53.  
  54. if [ -f /usr/ccs/bin/ucbcc ]
  55. then
  56.     # get the directory where ucbcc points to and set the LD_LIBRARY_PATH
  57.     # to that directory so as to get the necessary libraries.
  58.     cclink=`/usr/bin/ls -ln /usr/ccs/bin/ucbcc | awk '{print $11}'`
  59.     ccdir=`/usr/bin/dirname $cclink`
  60.  
  61.     /usr/ccs/bin/ucbcc \
  62.     -YP,:$ccdir:/usr/ccs/lib:/usr/lib "$@" \
  63.     -lsocket -lnsl -lelf -laio
  64.     ret=$?
  65.     exit $ret
  66. else
  67.     echo "/usr/ucb/cc:  language optional software package not installed"
  68.     exit 1
  69. fi
  70.